<!-- eslint-disable vue/multi-word-component-names -->
<script setup>
// 导入
import {ref, computed } from 'vue'
// 原始数据
const count = ref(0)
// 计算属性
const doubleCount = computed(()=>count.value * 2)

// 原始数据
const list = ref([1,2,3,4,5,6,7,8])
// 计算属性list
const filterList = computed(() => {
  return list.value.filter(item => item > 2)
})

setTimeout(() => {
  list.value.push(9, 10)
}, 300)
</script>

<template>
  <div>
    {{ doubleCount }} -- {{ list }} -- {{ filterList }}
  </div>
</template>